import { createApp } from 'vue';
import { createPinia } from 'pinia';

import App from './App.vue';

import router from './router';
import STable from '@surely-vue/table';
import ElementPlus from 'element-plus';
import zhCn from 'element-plus/es/locale/lang/zh-cn';
import '@surely-vue/table/dist/index.css';
import '@/styles/surely-table.scss';
import 'tailwindcss/tailwind.css';
import 'element-plus/dist/index.css';

import * as ElementPlusIconsVue from '@element-plus/icons-vue';
const app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(`ele-${key}`, component);
}

const pinia = createPinia();

app
  .use(ElementPlus, {
    locale: zhCn
  })
  .use(router)
  .use(STable)
  .use(pinia)
  .mount('#app');
